package com.snail.exception;

import com.snail.enums.ResultEnum;
import lombok.Getter;

/**
 * @Author 【swg】.
 * @Date 2017/12/8 14:52
 * @DESC
 * @CONTACT 317758022@qq.com
 */
@Getter
public class SellException extends RuntimeException{
    private Integer code;

   public SellException(ResultEnum resultEnum){
       super(resultEnum.getMessage());
       this.code = resultEnum.getCode();
   }

    public SellException(Integer code,String message){
        super(message);
        this.code = code;
    }
}
